/*
 Navicat Premium Data Transfer

 Source Server         : local-mysql
 Source Server Type    : MySQL
 Source Server Version : 50731
 Source Host           : localhost:3306
 Source Schema         : sc

 Target Server Type    : MySQL
 Target Server Version : 50731
 File Encoding         : 65001

 Date: 10/05/2021 11:15:34
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_message
-- ----------------------------
DROP TABLE IF EXISTS `t_message`;
CREATE TABLE `t_message` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `obj_id` varchar(100) NOT NULL DEFAULT '0' COMMENT '全局id',
  `state` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '消息状态（0：待发送，1：已发送，2：已完成）',
  `app_name` varchar(60) NOT NULL DEFAULT '' COMMENT '调用服务名（定时器补偿用）',
  `routing_key` varchar(100) NOT NULL DEFAULT '' COMMENT '消息路由key',
  `message_content` varchar(1500) NOT NULL COMMENT '消息内容（json）',
  `status` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '记录状态（0：删除，1：正常）',
  `created_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_obj_id` (`obj_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='消息服务表';

-- ----------------------------
-- Records of t_message
-- ----------------------------
BEGIN;
INSERT INTO `t_message` VALUES (1, 'b8e763ec-6a5c-48b0-a236-3ddf7e4a124a', 2, 'provider', 'queue.order.key', '{\"objId\":\"b8e763ec-6a5c-48b0-a236-3ddf7e4a124a\",\"appName\":\"provider\"}', 1, 1620615202627, 1620615205511, 0);
INSERT INTO `t_message` VALUES (2, '244c2dcf-cb5a-44f3-b31e-006f0ae3feb3', 2, 'provider', 'queue.order.key', '{\"objId\":\"244c2dcf-cb5a-44f3-b31e-006f0ae3feb3\",\"appName\":\"provider\"}', 1, 1620616179644, 1620616180608, 0);
COMMIT;

-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_no` varchar(60) NOT NULL DEFAULT '' COMMENT '订单号',
  `amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单金额',
  `state` tinyint(4) NOT NULL COMMENT '订单状态（0：待支付，1：待发货，2：待评价，3：已完成）',
  `status` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '记录状态（0：删除，1：正常）',
  `created_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单表';

-- ----------------------------
-- Records of t_order
-- ----------------------------
BEGIN;
INSERT INTO `t_order` VALUES (1, 'b8e763ec-6a5c-48b0-a236-3ddf7e4a124a', 200.00, 1, 1, 1620615178725, 1620615205434, 0);
INSERT INTO `t_order` VALUES (2, '244c2dcf-cb5a-44f3-b31e-006f0ae3feb3', 200.00, 1, 1, 1620616168771, 1620616180358, 0);
COMMIT;

-- ----------------------------
-- Table structure for t_pay
-- ----------------------------
DROP TABLE IF EXISTS `t_pay`;
CREATE TABLE `t_pay` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `order_no` varchar(60) NOT NULL DEFAULT '' COMMENT '订单单号',
  `pay_no` varchar(60) NOT NULL DEFAULT '' COMMENT '支付单号',
  `amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付金额',
  `state` tinyint(4) NOT NULL COMMENT '支付状态（0：待支付，1：成功，2：失败）',
  `status` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '记录状态（0：删除，1：正常）',
  `created_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='支付单表';

-- ----------------------------
-- Records of t_pay
-- ----------------------------
BEGIN;
INSERT INTO `t_pay` VALUES (1, '244c2dcf-cb5a-44f3-b31e-006f0ae3feb3', '6c6f8cbe-6f5d-42bd-9de5-3296472aa275', 200.00, 1, 1, 1620616177831, 1620616179818, 0);
INSERT INTO `t_pay` VALUES (2, '244c2dcf-cb5a-44f3-b31e-006f0ae3feb3', '6c6f8cbe-6f5d-42bd-9de5-3296472aa275', 200.00, 0, 1, 1620616177831, 1620616177831, 0);
COMMIT;

-- ----------------------------
-- Table structure for t_std
-- ----------------------------
DROP TABLE IF EXISTS `t_std`;
CREATE TABLE `t_std` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `status` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '记录状态（0：删除，1：正常）',
  `created_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `updated_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `deleted_at` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='标准表';

SET FOREIGN_KEY_CHECKS = 1;
